package demo1;
public class SingleLazy2 {
    private static  volatile SingleLazy2 instance = null;

    private SingleLazy2() {
    }

    public static SingleLazy2 get() {
        if (instance == null) {
            instance = new SingleLazy2();
        }
        return instance;
    }
}
